package com.coldchain.cys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;


/**
 * <p>
 * 
 * </p>
 *
 * @author tianpeng
 * @since 2018-08-28
 */
@TableName("t_car_driver")
public class CarDriver implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 司机管理表
     */
	@TableId(value="driverId", type= IdType.UUID)
	private String driverId;
	
	@TableField(exist=false)
	private Car car ;

	/**
	 * 承运商id
	 */
	private String cid ;
    /**
     * 车辆id
     */
	private String carid;
    /**
     * 司机姓名
     */
    @NotEmpty(message = "司机姓名不能为空")
	private String name;
    /**
     * 司机年龄
     */
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date birthday;
    /**
     * 司机联系电话
     */
    @NotEmpty(message = "联系电话不能为空")
	@Length(min = 11,max = 11,message = "电话号码格式不正确")
	private String phone;
	/**
	 * 司机密码
	 */
	private String password ; 
    /**
     * 司机身份证号码
     */
	@NotEmpty(message = "身份证号码不能为空")
	private String idcardNumber;
    /**
     * 司机身份证正面照片
     */
	private String idcardFace;
    /**
     * 司机身份证背面照片
     */
	private String idcardBack;
    /**
     * 司机手持身份证照片
     */
	private String idcardHand;
    /**
     * 驾驶许可证
     */
	@NotEmpty(message = " 驾驶证不能为空")
	private String driverLicense;
    /**
     * 乐观锁
     */
	@Version
	private Integer version;
    /**
     * 创建时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createtime;
    /**
     * 审核状态 0正在审核 1审核驳回 2审核通过（其他）
     */
	private Integer status;
    /**
     * 是否启用 0启用 -1禁用
     */
	private Integer isuse;
    /**
     * 是否删除 0未删除 -1删除了
     */
	@TableLogic
	private Integer isdel;

	/**
	 * 司机的工作状态0开工 1忙绿 2收工
	 */
	private Integer workstatus ; 

	/**
	 * 业绩/单
	 */
	private Integer achievement ;

	/**
	 * 退单
	 */
	private Integer refund ;

	/**
	 * 司机的头像
	 */
	private String headImage ;

	/**
	 * 是否自动接单 0不自动接单 1开启自动接单
	 */
	private Integer autoReceive ; 
	
	/**
	 * 是否语音播报 0不播报 1播报
	 */
	private Integer voiceNotice ;
	
	/**
	 * 接单时间 开始
	 */
	private String worktimeBegin ; 
	
	/**
	 * 接单时间 结束
	 */
	private String worktimeEnd ;

	public String getDriverId() {
		return driverId;
	}

	public void setDriverId(String driverId) {
		this.driverId = driverId;
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getCarid() {
		return carid;
	}

	public void setCarid(String carid) {
		this.carid = carid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getIdcardNumber() {
		return idcardNumber;
	}

	public void setIdcardNumber(String idcardNumber) {
		this.idcardNumber = idcardNumber;
	}

	public String getIdcardFace() {
		return idcardFace;
	}

	public void setIdcardFace(String idcardFace) {
		this.idcardFace = idcardFace;
	}

	public String getIdcardBack() {
		return idcardBack;
	}

	public void setIdcardBack(String idcardBack) {
		this.idcardBack = idcardBack;
	}

	public String getIdcardHand() {
		return idcardHand;
	}

	public void setIdcardHand(String idcardHand) {
		this.idcardHand = idcardHand;
	}

	public String getDriverLicense() {
		return driverLicense;
	}

	public void setDriverLicense(String driverLicense) {
		this.driverLicense = driverLicense;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getIsuse() {
		return isuse;
	}

	public void setIsuse(Integer isuse) {
		this.isuse = isuse;
	}

	public Integer getIsdel() {
		return isdel;
	}

	public void setIsdel(Integer isdel) {
		this.isdel = isdel;
	}

	public Integer getWorkstatus() {
		return workstatus;
	}

	public void setWorkstatus(Integer workstatus) {
		this.workstatus = workstatus;
	}

	public Integer getAchievement() {
		return achievement;
	}

	public void setAchievement(Integer achievement) {
		this.achievement = achievement;
	}

	public Integer getRefund() {
		return refund;
	}

	public void setRefund(Integer refund) {
		this.refund = refund;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public Integer getAutoReceive() {
		return autoReceive;
	}

	public void setAutoReceive(Integer autoReceive) {
		this.autoReceive = autoReceive;
	}

	public Integer getVoiceNotice() {
		return voiceNotice;
	}

	public void setVoiceNotice(Integer voiceNotice) {
		this.voiceNotice = voiceNotice;
	}

	public String getWorktimeBegin() {
		return worktimeBegin;
	}

	public void setWorktimeBegin(String worktimeBegin) {
		this.worktimeBegin = worktimeBegin;
	}

	public String getWorktimeEnd() {
		return worktimeEnd;
	}

	public void setWorktimeEnd(String worktimeEnd) {
		this.worktimeEnd = worktimeEnd;
	}
}
